Page({

  /**
   * 页面的初始数据
   */
  data: {
    imgUrls: [
      'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
      'http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg',
      'http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg'
    ],
    indicatorDots: true,
    autoplay: true,
    interval: 3000,
    duration: 1000,
    showCover:false,
    animationData: '',
  },

  showMask(){
    var animation = wx.createAnimation({
      duration: 500,
      timingFunction: 'ease',
      transformOrigin: '50% 50%'
    })
    animation.translateY(-452).step()
    this.setData({
      animationData: animation.export(),
      showCover: true
    })
  },

  hidenMask(){
    var animation = wx.createAnimation({
      duration: 500,
      timingFunction: 'ease',
      transformOrigin: '50% 50%'
    })
    animation.translateY(452).step()
    this.setData({
      animationData: animation.export(),
      showCover: false
    })
  },

  goShopcart(){
    wx.showToast({
      title: 'loading',
      icon: 'none'
    })
  }
})